package aaa;

import java.util.Random;
import java.util.UUID;

import redis.clients.jedis.Jedis;

public class Producers implements Runnable {
	Jedis jedis=new Jedis("localhost"); 
	
	public void run(){

		while (true) {
			try {
				Thread.sleep(100);
				UUID taskid=UUID.randomUUID();
				jedis.lpush("task", taskid.toString());
				System.out.println("插入一个新任务"+taskid);
			} catch (Exception e) {
				e.printStackTrace();
			}
			
		}
	}
}
